<template>
  <div id="wrapper">
    <div id="title">
      <ul id="title-ul">
        <li><img src="../../assets/common/back.png" alt="" @click="goBack"></li>
        <li>阿拉粉心得</li>
      </ul>

    </div>
    <div id="allTips">
      <ul id="allTips-title">
        <li> <router-link :to="{name: 'allTips/tips'}">全部心得</router-link></li>
        <li><router-link :to="{name: 'allTips/pritImg'}">晒图</router-link></li>
      </ul>
    </div>
    <router-view></router-view>
  </div>

</template>
<script>
  export default {
    methods:{
      goBack() {
        this.$router.go(-1);
      }
    }
  }
</script>
<style scoped>
  #title{
    width: 100%;
    height: 4.8rem;
    background-color: #e53e42;
    color: white;
    position: relative;
  }
  #title-ul li{
    display: inline-block;
    font-size: 1.8rem;
  }
  #title-ul {
    width:calc(100% - 2rem);
    height: 2rem;
    position: absolute;
    top:1.5rem;
    left: 1rem;
    right: 1rem;
  }
  #title-ul li:nth-child(1) img{
    width:1.2rem;
    height: 1.9rem;
    position: absolute;
    top:0;
    left: 0;
  }
  #title-ul li:nth-child(2){
    width:17rem;
    text-align: center;
    position: absolute;
    top:0;
    left:calc(50% - 8.5rem);
  }
  /*标题*/
  #allTips{
    padding: 0.5rem 0;
    border-bottom: 1px solid #cccccc;
  }
  #allTips-title{
    height: 4rem;
    display: flex;
  }
  #allTips-title li{
    display: inline-block;
    flex: 1;
    font-size: 1.5rem;
    line-height: 4rem;
    text-align: center;
  }
  #allTips-title li:nth-child(1){
    border-right: 1px solid #cccccc;
  }
  /*路由激活*/
  .router-link-active {
    color: red;
    border-bottom: 2px solid red;
  }
</style>
